package org.hd.utils.userutils;

import org.hd.entities.User;

import java.util.ArrayList;
import java.util.List;

public class UserUtils {

//    获取所有的用户列表，除第二个参数之外
    public static List<String> getUserList(List<User> list,String expectName){
        List<String> result = new ArrayList<>();
        for(int i = 0;i<list.size();i++){
            if(!list.get(i).getUsername().equals(expectName) ) {
                result.add(list.get(i).getUsername());
            }
        }
        return result;
    }

}
